
Configure Wifi
--------------

Retroarch menu from EmulationStation

Configure Wifi



Setup Keyboard (fix)
--------------------

sudo raspi-config from command line
Option 5 - international settings
	change country (US-UTF8)
	change keyboard layout (generic 104 key, other > US, no altgr key no compose key)
	change timezone
	change wifi country



Change Keybindings in Emulation Station
----------------------------------------

At a command line, cd to ~/.emulationstation

sudo nano es_input.cfg after making a backup

What you're going to want to do is swap "A" for "Start" and "B" for "Select"
The easiest way to do this is to edit the name in quotes on those 4 lines

For example, the line 

	<input name="start" type="key" id="101" value="1">

will become

	<input name="a" type="key" id="101" value="1">

You'd then want to go to the line with the name "a" and change it to start, and do the same for swapping b and select

This will make the P1 start button in Emulation Station start a game, and make the Select button a "Cancel/Back" button

This isn't required, it just makes the UI more friendly when using the X-Arcade

You can still pull up your menu to exit, scrape, change meta data, etc. with the A button (center bottom key)



Set up P2 Controls
------------------

edit /opt/retropie/configs/all/retroarch.cfg
	cp retroarch.cfg retroarch.cfg.bak
	sudo nano retroarch

copied P1 keys and changed to P2, input keys from X-Arcade

input_player1_a = t
input_player1_b = r
input_player1_y = q
input_player1_x = w
input_player1_start = num1
input_player1_select = num5
input_player1_l = e
input_player1_r = y
input_player1_left = left
input_player1_right = right
input_player1_up = up
input_player1_down = down
input_player1_l2 = u
input_player1_r2 = i
input_player1_l3 = nul
input_player1_r3 = nul

input_player2_a = j
input_player2_b = h
input_player2_y = d
input_player2_x = f
input_player2_start = num2
input_player2_select = num6
input_player2_l = g
input_player2_r = k
input_player2_left = a
input_player2_right = s
input_player2_up = o
input_player2_down = p
input_player2_l2 = l
input_player2_r2 = z
input_player2_l3 = nul
input_player2_r3 = nul


Scroll down to Enable Other Hotkeys section

input_enable_hotkey_btn = num1 #P1 Start
input_exit_emulator_btn = num5 #p1 Select
input_save_state_btn = u #P1 L2
input_load_state_btn = i #P1 R2

To verify that you did this correctly:
	Retroarch menu from EmulationStation
	RetroPie Setup option
	3. Setup/Config to be used post install
	314. Configure input devices for Retroarch
	1. Configure keyboard for use with Retroarch
	Verify that P2 options are all present



Reset Volume to 0db
-------------------

Retropie comes with the volume cranked way down.

Retropie Menu > Configure Audio Settings

Option 3 to set audio to HDMI specifically

Option 4 for Mixer
	I set audio level to "86" which is 0db gain



FTP Roms to Retropie
--------------------

get ip with ifconfig
SFFP with username pi password raspberry
Clean all files out of "Roms" subdirectories to remove unused systems from Emulationstation menu



Change "Megadrive" to "Genesis" (PCE to TG16, FBA to MAME, etc.)
-----------------------------------------------------------------

This is purely visual

Navigate to /etc/emulationstation and edit (after backing up) the es_systems.cfg file

Scroll down to the Megadrive section and change the following lines:

	<fullname>Sega Mega Drive / Genesis</fullname>  to  <fullname>Sega Genesis</fullname>

	<platform>megadrive</platform> to <platform>megadrive</platform>

	<theme>megadrive</theme> to <theme>genesis</theme>

I use FBA as my arcade emulator, but the logo for that is kinda stupid. You can change it to the MAME
logo in the UI by changing this line under the FBA section:

	<theme>fba</theme>  to  <theme>mame</theme>

This one may also be useful in the pcengine section

	<theme>pcengine</theme>  to  <theme>tg16</theme>



SSELPH Scraper
--------------

Exit EmulationStation
cd ~/RetroPie-Setup
sudo ./retropie_setup.sh
Option 3 - Setup / Configuration
Option 319 - Scraper for EmulationStation by Steven Selph

Scraper will install (takes a long time)



Set up Genesis for 6 button
---------------------------

Edit the file /opt/retropie/configs/all/retroarch-core-options.cfg

Add the following lines to the bottom of that config file:

picodrive_input1 = "6 button pad"
picodrive_input2 = "6 button pad"

If there are similar files there with "3 button pad" instead of creating new lines you can change them to match the above.

config file is saved in
/opt/retropie/configs/megadrive/retroarch.cfg

input_player1_a = y
input_player1_b = t
input_player1_y = r
input_player1_x = w
input_player1_l = q
input_player1_r = e

input_player2_a = k
input_player2_b = j
input_player2_y = h
input_player2_x = f
input_player2_l = d
input_player2_r = g


Copy Required BIOS files to Pi
------------------------------

From the provided retropie folder (laid out the same as the pi file structure)
copy all BIOS files to /home/pi/retropie/bios
Included BIOS files are for TG16, GBA, FDS



Copy and configure overlays for scanlines in emulators
------------------------------------------------------

File structure is the same.
Copy shader config file and png overlay file to:
/opt/retropie/emulators/retroarch/overlays/1080p_4-3

Edit retroarch.cfg files for all systems according to config in:
"Individual opt-retropie-configs-retroarch.cfg files.txt"



Disable Launch Menu for Roms
----------------------------

This is to keep people from hitting buttons when a ROM is launching and ending up in a menu

Retropie from the main wheel > Configure RunCommand Launch Script

1 Launch Menu - set to disabled
2 Launch menu art - set to enabled
3 Launch menu joystick control - disabled



Remove Retropie from the System List
------------------------------------

You're probably going to want to do this last. We'll remove this so nobody can get in and do damage
when the system is up and running after it's been configured. They could still possibly go in and 
delete games or change metadata within the "A" button menu (unless you've disabled it by commenting
that line out in es_input.cfg, but this will make it harder

Exit EmulationStation and from a command line:

sudo nano /etc/emulationstation/es_systems.cfg (after backing up)

Scroll down to the retropie section and commenet all the lines out with #'s

Go back in to ES and the Retropie menu should be gone


